<template>
	<view class="con">
		<view class="box">
			<view class="box-imgs">
				<scroll-view class="box-scroll-view" scroll-x>
					<view class="box-img" v-for="(item,index) in selectUser" :key="index">
						<image :src="item.head"></image>
					</view>
				</scroll-view>
			</view>
			<input @confirm="searchUser" placeholder="搜索" type="text" confirm-type="search" />
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			selectUser: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				//selectUser: [1, 1, 1, 1, 1, 1, 1, 1, 1]
			}
		},
		methods: {
			searchUser(e) {
				//console.log(e.detail.value)
				this.$emit('searchUser', e.detail.value)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.con {
		width: 100%;

		.box {
			width: 96%;
			border-top: 1rpx solid #c0c0c0;
			border-bottom: 1rpx solid #c0c0c0;
			height: 80rpx;
			// border-radius: 40rpx;
			padding: 10rpx 2%;
			display: flex;

			.box-imgs {
				max-width: 400rpx;
				height: 80rpx;
				overflow: hidden;
				// padding: 20rpx;
				background: #fff;
				white-space: nowrap;
				//border: 1px solid red;
			}

			.box-scroll-view {
				height: 100%;
				width: auto;
				overflow: hidden;
			}


			.box-img {
				//display: flex;
				//max-width: 300rpx;
				display: inline-block;

				image {
					margin: 0 7rpx;
					width: 70rpx;
					height: 70rpx;
					//border-radius: 10rpx;
				}
			}



			input {
				margin-left: 15rpx;
				height: 70rpx;
				line-height: 70rpx;
				width: 100%;
			}
		}


	}
</style>